package com.ischoolbar.programmer.service.home.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ischoolbar.programmer.dao.home.CommentDao;
import com.ischoolbar.programmer.entity.home.Comment;
import com.ischoolbar.programmer.service.home.CommentService;

@Service
public class CommentServiceImpl implements CommentService{

	@Autowired
	private CommentDao commentDao;

	
	@Override
	public int add(Comment comment) {
		// TODO Auto-generated method stub
		return commentDao.add(comment);
	}


	@Override
	public List<Comment> findList(Map<String, Object> queryMap) {
		// TODO Auto-generated method stub
		return commentDao.findList(queryMap);
	}


	@Override
	public int getTotal(Map<String, Object> queryMap) {
		// TODO Auto-generated method stub
		return commentDao.getTotal(queryMap);
	}


	@Override
	public int delete(String ids) {
		// TODO Auto-generated method stub
		return commentDao.delete(ids);
	}


	@Override
	public int deleteByProductId(Long productId) {
		// TODO Auto-generated method stub
		return commentDao.deleteByProductId(productId);
	}


	@Override
	public int deleteByAccountId(Long accountId) {
		// TODO Auto-generated method stub
		return commentDao.deleteByAccountId(accountId);
	}


	@Override
	public Comment findById(Long id) {
		// TODO Auto-generated method stub
		return commentDao.findById(id);
	}

	
	
	
}
